function Game(id, players, info)
{
    this.id = id;
    this.players = players;
    this.info = info;
    this.turns = [];
    
    this.initialized = function() { if (this.info) return true; return false; }
    
    this.currentTurn = function() { return this.turns.length; }
    this.currentSide = function() { return this.currentTurn() % 2 }
    this.currentPlayer = function() { return this.players[this.currentSide()] }
    
    this.addTurn = function(turn) { this.turns.push(turn); }
    this.hierarkia = function() {
        if(!this.info) throw "Game.hierarkia() for uninitialized game!";
        if(this.turns.length == 0) return new Hierarkia(this.info, undefined, undefined);
        return this.turns[this.turns.length-1];
    }
}


